#include <iostream>
using namespace std;
typedef long long ll;
string s;
int main()
{
	int n;
	cin>>n>>s;
	ll ans=1;
	
	for(int i=0;i<n;i++)
	{
		ll sum=0;
		sum+=s[i]-'a'+1;
		ans*=sum;
	}
	cout<<ans-1;
	return 0;
}
